#include "SMPPDestNodeId.hpp"

using namespace smpp::pdu;

DestNodeId::DestNodeId(const octetString &nValue):
TLV(TLVtags::TAG_DEST_ADDR_NP_INFORMATION,nValue.size()),_Value(nValue){}

DestNodeId::DestNodeId(const DestNodeId &nDestNodeId):
TLV(nDestNodeId),_Value(nDestNodeId.getValue()){}

bool DestNodeId::operator ==(const DestNodeId &nDestNodeId) const{
	return (TLV::operator == (nDestNodeId) && 
			_Value == nDestNodeId.getValue());
}

bool DestNodeId::operator !=(const DestNodeId &nDestNodeId) const{
	return !this->operator == (nDestNodeId);
}

DestNodeId &DestNodeId::operator = (const DestNodeId &nDestNodeId){
	if(*this == nDestNodeId)
		return *this;
	TLV::operator = (nDestNodeId);
	_Value = nDestNodeId.getValue();
	return *this;
}

void DestNodeId::setValue(const octetString &nValue){
	_Value = nValue;
}

const octetString &DestNodeId::getValue() const{
	return _Value;
}
